package cn.csg.iotplatform.module.system.controller.admin.project.vo;

import cn.csg.iotplatform.framework.common.constants.DictType;
import cn.csg.iotplatform.framework.excel.core.annotations.DictFormat;
import cn.csg.iotplatform.framework.excel.core.convert.DictConvert;
import cn.csg.iotplatform.module.common.annotations.DictField;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - 设备中心项目信息 Response VO")
@Data
@ExcelIgnoreUnannotated
public class ProjectManagerRespVO {

    @Schema(description = "主键ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "14464")
    private String id;

    @Schema(description = "项目编号", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("项目编号")
    private String projectNo;

    @Schema(description = "项目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @ExcelProperty("项目名称")
    private String projectName;

    @Schema(description = "项目Id", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @ExcelProperty("项目Id")
    private String projectId;

    @Schema(description = "建设单位名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六")
    @ExcelProperty("建设单位名称")
    private String unitName;

    @Schema(description = "建设负责人")
    @ExcelProperty("建设负责人")
    private String unitUser;

    @Schema(description = "建设负责人电话")
    @ExcelProperty("建设负责人电话")
    private String unitTel;

    @Schema(description = "承建单位编号")
    @ExcelProperty("承建单位编号")
    private String constructionCode;

    @Schema(description = "承建单位名称", example = "李四")
    @ExcelProperty("承建单位名称")
    private String constructionName;

    @Schema(description = "承建单位负责人")
    @ExcelProperty("承建单位负责人")
    private String constructionUser;

    @Schema(description = "承建单位负责人电话")
    @ExcelProperty("承建单位负责人电话")
    private String constructionTel;

    @Schema(description = "数据来源")
    @ExcelProperty(value = "数据来源", converter = DictConvert.class)
    @DictFormat(DictType.PROJECT_DATA_SOURCE)
    @DictField(dictType = DictType.PROJECT_DATA_SOURCE)
    private Integer dataSource;

    @Schema(description = "启用状态", example = "1")
    @ExcelProperty(value = "启用状态", converter = DictConvert.class)
    @DictFormat(DictType.CM_ENABLE)
    @DictField(dictType = DictType.CM_ENABLE)
    private Integer enablingStatus;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "网关设备数量")
    @ExcelProperty("网关设备数量")
    private Integer gatewayDeviceNum;

    @Schema(description = "子终端数量")
    @ExcelProperty("子终端数量")
    private Integer subDeviceNum;

    @Schema(description = "普通设备数量")
    @ExcelProperty("普通设备数量")
    private Integer commonDeviceNum;

    @Schema(description = "描述", example = "你猜")
    @ExcelProperty("描述")
    private String description;

    /**
     * 共库新增字段：项目管理单位id，可为空
     */
    @Schema(description = "项目单位Id(设备中心单位Id)")
    @ExcelProperty("项目单位Id(设备中心单位Id)")
    private String unitId;

    /**
     * 共库新增字段：用于保存本库SYSTEM_DEPT表中code对应的ID字段
     */
    @Schema(description = "项目单位Id")
    @ExcelProperty("项目单位Id")
    private Long orgId;

    /**
     * 共库新增字段：项目归属的地市局编码
     */
    @Schema(description = "项目归属的地市局编码")
    @ExcelProperty("项目归属的地市局编码")
    private String unitOrgCode;

    /**
     * 共库新增字段：项目所属业主项目部名称，可为空
     */
    @Schema(description = "项目部门名称")
    @ExcelProperty("项目部门名称")
    private String projectOwners;

    /**
     * 共库新增字段：项目所属业主项目部id，可为空
     */
    @Schema(description = "项目部门Id")
    @ExcelProperty("项目部门Id")
    private String projectOwnerId;

}